#pragma once
#include "EngineObject.h"
#include "RenderWindow.h"
#include "RenderData.h"
#include "PLugin.h"
#include "DynLib.h"

namespace DreamEngine
{
class CVideoManager;

class _EngineExport CRenderSystem : public CEngineObject
{
public:

	CRenderSystem(void);
	virtual ~CRenderSystem(void);

public:

	virtual Error			Initialize(void)		=0;
	virtual Error			ShutDown(void)			=0;

	virtual CRenderWindow*	CreateRenderWindow(const CString& name,
			m_uint16 width, m_uint16 heigth)=0;

	virtual void			BeginFrame()	=0;
	virtual void			EndFrame()		=0;

	virtual void			Render(CRenderData* pRenderData)=0;


	CRenderWindow*			GetActiveRenderWindow()const		{return m_pActiveWindow;}

private:

	virtual void			_SetViewport(CViewport* pViewport)=0;

protected:

	

	typedef std::vector<CRenderWindow*>  RenderWindowLst;
	RenderWindowLst			m_renderWindows;

	CRenderWindow*			m_pActiveWindow;
	
};

}

